import {routes} from "@/router";

//判断是否有权限访问该菜单
//根据路由名称获取菜单
//根据路由名称获取菜单
//对菜单进行排序


const rolesmenu = {
  state:{
    routers:routes
  },
  mutations:{
    SET_ROUTERS:(state,routers)=>{
      state.routers = routes.concat(routers)
    }
  },
  actions:{
    generateRouters({commit},data){
      return new Promise((resolve,reject)=>{
        //return console.log('test')
        resolve(22)
      })

    }
  }
}

export default rolesmenu
